<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS处理</title>
    <script type="text/javascript" src="../js/jquery-3.4.1.min.js"></script>
    <style>
        .c3{
            width: 300px;
            height: 200px;
            background: blue;
        }
        .c1{
            width: 100px;
            height: 100px;
            background: green;
        }
        .c2{
            width: 300px;
            height: 200px;
            background: blue;
        }
    </style>
    <script>
        $(function(){
           $("#d1").mouseover(function(){
              $(this).css("width","100px");
              $(this).css("height","100px");
              $(this).css("background","green");
           });
           $("#d1").mouseout(function(){
              $(this).css("width","300px");
              $(this).css("height","200px");
              $(this).css("background","red");
           });
           $(".c3").mouseover(function(){
               $(this).removeClass("c3");
               $(this).addClass("c1");
           });
        });
    </script>
</head>
<body>
<div id="d1" style="width: 300px;height: 200px;background: red;"></div>
<div class="c3"></div>
</body>
</html>